package com.whmnx.chitchat.adapter;

import android.content.Context;
import android.text.TextUtils;
import android.widget.ImageView;

import com.classic.adapter.BaseAdapterHelper;
import com.classic.adapter.CommonRecyclerAdapter;
import com.whmnx.chitchat.R;
import com.whmnx.chitchat.bean.GroupBean;
import com.whmnx.chitchat.bean.UnMsgBean;
import com.whmnx.chitchat.utils.ImageUtil;
import com.whmnx.chitchat.utils.TimeUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * author : huang
 * date   : 2020/7/27 0027 17:31
 * version: 1.0
 * @author Administrator
 */
public class UnMsgAdpter extends CommonRecyclerAdapter<UnMsgBean.ForumListBean> {
    private Context context;
    private List<Boolean> alreadyLikeList = new ArrayList<>();
    private ImageView view;


    public UnMsgAdpter(Context context) {
        super(context, R.layout.item_list_msg);
        this.context = context;
    }


    @Override
    public void onUpdate(BaseAdapterHelper helper, UnMsgBean.ForumListBean item, int position) {
        ImageUtil.setImage(helper.getView(R.id.cv_user),item.getSendUserHeadImg());
        helper.setText(R.id.tv,item.getSendUserNikeName());
        helper.setText(R.id.tv2,item.getForum_Content());
        helper.setText(R.id.tv3, TimeUtils.getFriendlyTimeSpanByNow(item.getForumMsg_CreateTime()));


    }
}
